package com.sxf.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.sxf.dao.TermRelationshipsDAO;
import com.sxf.domain.blog.TermRelationships;
import com.sxf.mybatis.page.Pagination;
import com.sxf.querybean.TermRelationshipsQuery;
import com.sxf.service.TermRelationshipsService;

@Service("termRelationshipsService")
public class TermRelationshipsServiceImpl implements TermRelationshipsService {
	@Resource(name = "termRelationshipsDAO")
	private TermRelationshipsDAO dao;

	@Override
	@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
	public List<TermRelationships> queryList(TermRelationshipsQuery query) {
		return dao.queryList(query);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
	public long queryNumber(TermRelationshipsQuery query) {
		return dao.queryNumber(query);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
	public TermRelationships queryOne(TermRelationshipsQuery query) {
		return dao.queryOne(query);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
	public Pagination<TermRelationships> queryPage(TermRelationshipsQuery query) {
		return dao.queryPage(query);
	}

	@Override
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = { Exception.class })
	public int insert(TermRelationships info) {
		return dao.insert(info);
	}

	@Override
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = { Exception.class })
	public int update(TermRelationships info) {
		return dao.update(info);
	}

	@Override
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = { Exception.class })
	public int delete(TermRelationships info) {
		return dao.delete(info);
	}

}
